Skip to content

Comments

fix: resolve n8n community node pre-check failures#6

Open
pranavjana wants to merge 2 commits intomainfrom
fix/n8n-node-precheck
Open

fix: resolve n8n community node pre-check failures#6
pranavjana wants to merge 2 commits intomainfrom
fix/n8n-node-precheck

Conversation

@pranavjana
Copy link
Contributor

Summary

  • Remove setTimeout/clearTimeout to pass n8n security scan
  • Fix credential icon format from object to string
  • Update repo URL to point to n8n subfolder for credential file discovery
  • Remove timeout option from node UI (relies on n8n built-in execution timeout)

Remove retry logic and custom timeout in favor of n8n's built-in
execution timeout. Removes timeout option from node UI.
- Remove setTimeout/clearTimeout to pass security scan
- Fix credential icon format from object to string
- Update repo URL to point to n8n subfolder
- Remove timeout option from node UI
@coderabbitai
Copy link

coderabbitai bot commented Feb 21, 2026

📝 Walkthrough

Walkthrough

This pull request simplifies the Tinyfish node integration by removing timeout handling and retry logic. The icon property in the TinyfishApi credential is changed from a dual-theme object to a single string path. The consumeSseStream function no longer accepts a timeout parameter, and the retry mechanism with MAX_RETRIES and related helpers has been removed from tinyfishApiRequest. The Tinyfish node no longer extracts or passes timeout values to these functions. Additionally, the Timeout (Seconds) UI option is removed from the description, and package metadata is updated with a version bump and adjusted repository URL.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: resolve n8n community node pre-check failures' accurately summarizes the main objective of the changeset, which addresses failing pre-check validations by removing timeout logic, fixing credential icon format, updating the repo URL, and removing the timeout UI option.
Description check ✅ Passed The description clearly relates to the changeset, outlining the four main changes: removing setTimeout/clearTimeout for security compliance, fixing credential icon format, updating repo URL, and removing the timeout option from the UI.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/n8n-node-precheck

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
n8n/nodes/Tinyfish/GenericFunctions.ts (1)

53-56: ⚠️ Potential issue | 🟡 Minor

Stale JSDoc comment: retry logic was removed.

The comment still states "Retries on 429/5xx with exponential backoff (max 3 retries)" but the retry mechanism has been removed in this PR. Update the comment to reflect the current behavior.

📝 Proposed fix
 /**
  * Make an authenticated request to the TinyFish API.
- * Retries on 429/5xx with exponential backoff (max 3 retries).
+ * Relies on n8n's built-in execution timeout for error handling.
  */
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@n8n/nodes/Tinyfish/GenericFunctions.ts` around lines 53 - 56, The JSDoc above
the TinyFish API request implementation (the comment starting "Make an
authenticated request to the TinyFish API.") is stale—remove or update the
sentence "Retries on 429/5xx with exponential backoff (max 3 retries)" to
reflect that the retry mechanism was removed; edit that JSDoc to state the
current behavior (single authenticated request with no automatic retries) and
keep any auth/response details accurate so the comment matches the actual
implementation.
🧹 Nitpick comments (1)
n8n/nodes/Tinyfish/GenericFunctions.ts (1)

223-225: Redundant try/catch that only rethrows.

The outer catch block on lines 223-225 catches the error and immediately rethrows it without any transformation or logging. This is unnecessary since the inner error handling (lines 147-154) already throws appropriate errors.

♻️ Proposed fix to remove redundant wrapper
 export async function consumeSseStream(
 	this: IExecuteFunctions,
 	payload: IDataObject,
 ): Promise<IDataObject> {
 	const credentials = await this.getCredentials('tinyfishApi');
 	const apiKey = credentials.apiKey as string;

 	let lastProgress = '';

-	try {
-		const response = await fetch(`${API_BASE_URL}/v1/automation/run-sse`, {
+	const response = await fetch(`${API_BASE_URL}/v1/automation/run-sse`, {
 		method: 'POST',
 		headers: {
 			'X-API-Key': apiKey,
 			'Content-Type': 'application/json',
 		},
 		body: JSON.stringify(payload),
-		});
+	});
 
 		// ... rest of the function body unchanged ...
 
 		return finalResult;
-	} catch (error) {
-		throw error;
-	}
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@n8n/nodes/Tinyfish/GenericFunctions.ts` around lines 223 - 225, The outer
try/catch that catches and immediately rethrows the error is redundant—remove
the catch block (the closing catch { throw error; } that follows the surrounding
try in GenericFunctions.ts) so errors from the inner logic (which already throw
appropriate errors around the inner error handling) propagate naturally; ensure
you only delete the catch clause and its brace while keeping the try body intact
so compilation and control flow are unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@n8n/package.json`:
- Around line 20-23: The repository.url in package.json is a GitHub web UI path;
change it to a cloneable Git URL (e.g.,
git+https://github.com/tinyfish-io/tinyfish-web-agent-integrations.git) and add
a repository.directory field set to "n8n" so npm can resolve the monorepo
subpackage; update the repository object (repository.url and add
repository.directory) in package.json to use the .git clone URL and the
subdirectory name.

---

Outside diff comments:
In `@n8n/nodes/Tinyfish/GenericFunctions.ts`:
- Around line 53-56: The JSDoc above the TinyFish API request implementation
(the comment starting "Make an authenticated request to the TinyFish API.") is
stale—remove or update the sentence "Retries on 429/5xx with exponential backoff
(max 3 retries)" to reflect that the retry mechanism was removed; edit that
JSDoc to state the current behavior (single authenticated request with no
automatic retries) and keep any auth/response details accurate so the comment
matches the actual implementation.

---

Nitpick comments:
In `@n8n/nodes/Tinyfish/GenericFunctions.ts`:
- Around line 223-225: The outer try/catch that catches and immediately rethrows
the error is redundant—remove the catch block (the closing catch { throw error;
} that follows the surrounding try in GenericFunctions.ts) so errors from the
inner logic (which already throw appropriate errors around the inner error
handling) propagate naturally; ensure you only delete the catch clause and its
brace while keeping the try body intact so compilation and control flow are
unchanged.

Comment on lines 20 to 23
"repository": {
"type": "git",
"url": "https://github.com/tinyfish-io/tinyfish-web-agent-integrations.git",
"directory": "n8n"
"url": "https://github.com/tinyfish-io/tinyfish-web-agent-integrations/tree/main/n8n"
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

npm package.json repository field format requirements GitHub URL

💡 Result:

In package.json, the repository field can be either:

  1. An object (recommended) with type and url (optionally directory for monorepos):
{
  "repository": {
    "type": "git",
    "url": "git+https://github.com/OWNER/REPO.git"
  }
}

The url should be a VCS-cloneable URL (for machines), not a browser “project page” URL. [1]

  1. A shorthand string (supported, but npm may normalize it to the object form on publish and warn):
{ "repository": "github:OWNER/REPO" }

or even:

{ "repository": "OWNER/REPO" }

npm supports shorthands for GitHub/Gist/Bitbucket/GitLab similar to npm install syntax. [1]

If you’re publishing to GitHub Packages, GitHub notes the repository field should match your GitHub repo URL (example given as https://github.com/my-org/test.git). [2]

Sources: [1] npm Docs package.jsonrepository field, formats, shorthands, normalization, directory option; [2] GitHub Docs on npm registry + repository field matching GitHub repo URL.


🏁 Script executed:

# Check the actual current state of the n8n package.json file
find . -name "package.json" -path "*/n8n/*" -type f | head -5

Repository: tinyfish-io/tinyfish-web-agent-integrations

Length of output: 105


🏁 Script executed:

# Look at the n8n/package.json file directly
cat n8n/package.json | head -30

Repository: tinyfish-io/tinyfish-web-agent-integrations

Length of output: 956


Invalid repository URL format for npm package.json.

The repository.url must be a Git-cloneable URL, not a GitHub web UI URL. The current value https://github.com/tinyfish-io/tinyfish-web-agent-integrations/tree/main/n8n is a browser path and will fail when npm attempts to resolve the repository. For monorepo subdirectories, use the base repository .git URL with the directory field:

🛠️ Proposed fix
"repository": {
  "type": "git",
-  "url": "https://github.com/tinyfish-io/tinyfish-web-agent-integrations/tree/main/n8n"
+  "url": "https://github.com/tinyfish-io/tinyfish-web-agent-integrations.git",
+  "directory": "n8n"
},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@n8n/package.json` around lines 20 - 23, The repository.url in package.json is
a GitHub web UI path; change it to a cloneable Git URL (e.g.,
git+https://github.com/tinyfish-io/tinyfish-web-agent-integrations.git) and add
a repository.directory field set to "n8n" so npm can resolve the monorepo
subpackage; update the repository object (repository.url and add
repository.directory) in package.json to use the .git clone URL and the
subdirectory name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants